<template>
  <div class="custom-form" style="background-color: white;">
    <el-row :gutter="15">
      <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px"
        :key="showFormKey" v-if="showForm">
        <el-col :span="24" v-show="hasFormPermission('modle_id')">
          <el-form-item :label="$t('产品类型')" prop="modle_id">
            <el-select v-model="formData['modle_id']" placeholder="请选择产品类型"
              :disabled="hasDisabledPermission('modle_id',false)" filterable clearable
              :style="{width: '100%'}">
              <el-option v-for="(item, index) in modle_idOptions" :key="index" :label="item.F_ModelName"
                :value="item.F_Id" :disabled="item.disabled"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-show="hasFormPermission('prompt')">
          <el-form-item :label="$t('关键词')" prop="prompt">
            <el-input v-model="formData['prompt']" type="textarea" placeholder="请输入关键词（多个以英文逗号分隔）"
              :disabled="hasDisabledPermission('prompt',false)"
              :readonly="!hasEditPermission('prompt',false)" :autosize="{minRows: 4, maxRows: 4}"
              :style="{width: '100%'}"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4" v-show="hasFormPermission('batch_size')">
          <el-form-item :label="$t('生成数量')" prop="batch_size">
            <el-slider style="width:80%" :disabled="hasDisabledPermission('batch_size',false)"
              :readonly="!hasEditPermission('batch_size',undefined)" :min='1' :max='4' :step='1'
              v-model="formData['batch_size']"></el-slider>
          </el-form-item>
        </el-col>
        <el-col :span="5" v-show="hasLookFormPermission('field104844d')">
          <el-form-item label-width="0" prop="field104844d">
            <h2 align='center' style="color:;font-size: 15px;text-align: center" :style="{width: '100%'}">方案1
            </h2>
          </el-form-item>
        </el-col>
        <el-col :span="5" v-show="hasLookFormPermission('field1052dd1')">
          <el-form-item label-width="0" prop="field1052dd1">
            <h2 align='center' style="color:;font-size: 15px;text-align: center" :style="{width: '100%'}">方案2
            </h2>
          </el-form-item>
        </el-col>
        <el-col :span="5" v-show="hasLookFormPermission('field106adc0')">
          <el-form-item label-width="0" prop="field106adc0">
            <h2 align='center' style="color:;font-size: 15px;text-align: center" :style="{width: '100%'}">方案3
            </h2>
          </el-form-item>
        </el-col>
        <el-col :span="5" v-show="hasLookFormPermission('field1074efc')">
          <el-form-item label-width="0" prop="field1074efc">
            <h2 align='center' style="color:;font-size: 15px;text-align: center" :style="{width: '100%'}">方案4
            </h2>
          </el-form-item>
        </el-col>
        <el-col :span="4" v-show="hasFormPermission('resolving_power')">
          <el-form-item :label="$t('分辨率')" prop="resolving_power">
            <el-radio-group v-model="formData['resolving_power']" size="medium"
              :disabled="hasDisabledPermission('resolving_power',false)"
              :readonly="!hasEditPermission('resolving_power',undefined)">
              <el-radio v-for="(item, index) in resolving_powerOptions" :key="index" :label="item.F_ItemValue"
                :disabled="item.disabled">{{item.F_ItemName}}</el-radio>
            </el-radio-group>
          </el-form-item>
		  <el-form-item :label="$t('宽度')" prop="p_width">
		    <el-slider style="width:80%" :min='64' :max='2048' :step='1' v-model="formData['p_width']"></el-slider>
		  </el-form-item>
		  <el-form-item :label="$t('高度')" prop="p_height">
		    <el-slider style="width:80%" :min='64' :max='2048' :step='1' v-model="formData['p_height']"></el-slider>
		  </el-form-item>
		    
		  <el-form-item label-width="10px" prop="field114df64" style="margin-left:10px;display: flex;justify-content: center;" v-show="hasLookFormPermission('field114df64')">
		    <el-button type="primary" style="width:100px ;" @click='createImg()'><i class='el-icon-thumb'></i>生成</el-button>
			<el-button type="primary" style="width:100px ;" @click='formClear()'><i class='el-icon-delete'></i>清空</el-button>
		  </el-form-item>
        </el-col>
        <el-col :span="5" v-show="hasFormPermission('img1')">
          <el-form-item label-width="0" prop="img1">
            <el-image :disabled="hasDisabledPermission('img1',undefined)"
              :readonly="!hasEditPermission('img1',undefined)" :style="{width: '100%',display: 'flex','justify-content': 'center'}"
              :src='formData.img1' :preview-src-list="formData.imgList">
              <div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
            </el-image>
			<div style="width: 100%;display: flex;justify-content: center;margin-top: 10px;" v-show="formData.img1!=''&&formData.img1!=null">
			  <el-button
			    type="opr-primary"
			    icon="el-icon-upload"
			    @click="saveImg(formData.img1)"
			    :title="'保存到<我的设计>'"
			  ></el-button>
			  <el-button
			    type="opr-primary"
			    icon="el-icon-download"
			    @click="downloadImg(formData.img1)"
			    :title="'下载到本地'"
			  ></el-button>
			  <!-- <el-button
			    type="opr-primary"
			    icon="el-icon-star-on"
			    @click="prettifyImg(formData.img1)"
			    :title="'增强画质'"
			  ></el-button> -->
			</div>
          </el-form-item>
        </el-col>
        <el-col :span="5" v-show="hasFormPermission('img2')">
          <el-form-item label-width="0" prop="img2">
            <el-image :disabled="hasDisabledPermission('img2',undefined)"
              :readonly="!hasEditPermission('img2',undefined)" :style="{width: '100%',display: 'flex','justify-content': 'center'}"
              :src='formData.img2' :preview-src-list="formData.imgList">
              <div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
            </el-image>
			<div style="width: 100%;display: flex;justify-content: center;margin-top: 10px;" v-show="formData.img2!=''&&formData.img2!=null">
			  <el-button
			    type="opr-primary"
			    icon="el-icon-upload"
			    @click="saveImg(formData.img2)"
			    :title="'保存到<我的设计>'"
			  ></el-button>
			  <el-button
			    type="opr-primary"
			    icon="el-icon-download"
			    @click="downloadImg(formData.img2)"
			    :title="'下载到本地'"
			  ></el-button>
			  <!-- <el-button
			    type="opr-primary"
			    icon="el-icon-star-on"
			    @click="prettifyImg(formData.img2)"
			    :title="'增强画质'"
			  ></el-button> -->
			</div>
          </el-form-item>
        </el-col>
        <el-col :span="5" v-show="hasFormPermission('img3')">
          <el-form-item label-width="0" prop="img3">
            <el-image :disabled="hasDisabledPermission('img3',undefined)"
              :readonly="!hasEditPermission('img3',undefined)" :style="{width: '100%',display: 'flex','justify-content': 'center'}"
              :src='formData.img3' :preview-src-list="formData.imgList">
              <div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
            </el-image>
			<div style="width: 100%;display: flex;justify-content: center;margin-top: 10px;" v-show="formData.img3!=''&&formData.img3!=null">
			  <el-button
			    type="opr-primary"
			    icon="el-icon-upload"
			    @click="saveImg(formData.img3)"
			    :title="'保存到<我的设计>'"
			  ></el-button>
			  <el-button
			    type="opr-primary"
			    icon="el-icon-download"
			    @click="downloadImg(formData.img3)"
			    :title="'下载到本地'"
			  ></el-button>
			  <!-- <el-button
			    type="opr-primary"
			    icon="el-icon-star-on"
			    @click="prettifyImg(formData.img3)"
			    :title="'增强画质'"
			  ></el-button> -->
			</div>
          </el-form-item>
        </el-col>
        <el-col :span="5" v-show="hasFormPermission('img4')">
          <el-form-item label-width="0" prop="img4">
            <el-image :disabled="hasDisabledPermission('img4',undefined)"
              :readonly="!hasEditPermission('img4',undefined)" :style="{width: '100%',display: 'flex','justify-content': 'center'}"
              :src='formData.img4' :preview-src-list="formData.imgList">
              <div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
            </el-image>
			<div style="width: 100%;display: flex;justify-content: center;margin-top: 10px;" v-show="formData.img4!=''&&formData.img4!=null">
			  <el-button
			    type="opr-primary"
			    icon="el-icon-upload"
			    @click="saveImg(formData.img4)"
			    :title="'保存到<我的设计>'"
			  ></el-button>
			  <el-button
			    type="opr-primary"
			    icon="el-icon-download"
			    @click="downloadImg(formData.img4)"
			    :title="'下载到本地'"
			  ></el-button>
			  <!-- <el-button
			    type="opr-primary"
			    icon="el-icon-star-on"
			    @click="prettifyImg(formData.img4)"
			    :title="'增强画质'"
			  ></el-button> -->
			</div>
          </el-form-item>
        </el-col>
      </el-form>
    </el-row>
  </div>
</template>
<script>

        import authorizeMixin from "@/mixins/authorize";
        import { baseUrl } from "@/config/env";
        import request from "@/router/axios";
         import {fieldsConfig,formFieldsMap,getHideComponents} from './t_aiplm_text2img_simpleConfig'
		import { formValidateNotice } from '@/util/util';
        export default {
          mixins: [authorizeMixin],
       
  components: {},
  props: ['keyValue', 'isEdit', 'disabled'],
  data() {
    return {
      userInfo: {},
      submitLoading: false,
      showForm: true,
      showFormKey: 1,
      reRenderSubform: false,
      operationVal: 'add',
      isAdd: true,
      addressUrl:'t_aiplm_text2img_simple',
      autoCompleteConfEventData: [],
      mainTableName: 't_aiplm_text2img_simple',
      formConfig: {},
      formFieldsMap: new Map(),
      hideComponentsMap: new Map(),
      needShowValueTags: ['asso-popup', 'mutiple-popup'],
      formData: {
		'imgList':[],
        'modle_id': "",
        'prompt': '',
        'batch_size': 1,
        'p_width': 512,
        'p_height': 512,
        'resolving_power': "1",
        'img1': "",
        'img2': "",
        'img3': "",
        'img4': "",
      },
      rules: {
        modle_id: [{
          required: true,
          message: '请选择产品类型',
          trigger: 'change'
        }],
        prompt: [],
        resolving_power: [],
      },
      modle_idOptions: [],
      resolving_powerOptions: [],
    }
  },
  computed: {},
  watch: {},
  async created() {
    this.formConfig = this.getFormConfig();
    this.formFieldsMap = this.getFormFieldsMap();
    this.userInfo = localStorage.getItem("avue-userInfo") ? JSON.parse(localStorage.getItem(
      "avue-userInfo")).content : {};
  },
  async mounted() {
    this.hideComponentsMap = await this.getHideComponentsMap();
    this.showForm = false;
    await this.insertCreatedEvent();
    //TODO   再这里做数据回填 请求表单数据
       
    if (typeof this.getField100Options == "function") {
      await this.getField100Options();
    }
    if (typeof this.getField109Options == "function") {
      await this.getField109Options();
    }
    await this.insertMountedEvent();
    this.reRenderSubform = true; //子表单显示
    this.showFormKey++;
    this.processParameterAssignment();
    this.showForm = true;
  },
  methods: {
    getFormData() {
      return this.formData;
    },
    validateForm() {
      this.$refs['elForm'].validate(valid => {});
    },
    async aysncValidateForm() {
      let validataArry = []
      let formValidateNotice = function formValidateNotice(obj, that, formAuth) {
        for (var o in obj) {
          if (!formAuth[o] && obj[o][0]) {
            that.$message({
              message: obj[o][0].message + ',' + that.$t('noFormAuth'),
              type: 'warning'
            });
            return;
          }
        }
      }
      validataArry.push(new Promise((resolve, reject) => {
        this.$refs['elForm'].validate((valid, object) => {
          if (!this.isWorkflowForm) formValidateNotice(object, this, this.formEnCodeList)
          resolve(valid)
        })
      }))
      let res = await Promise.all(validataArry)
      if (res.includes(false)) {
        return false
      }
      else {
        return true;
      }
    },
    changeTableData() {},
    async submitForm() {
      this.submitLoading = true;
      let valid = await this.aysncValidateForm();
      if (valid == false) {
        this.submitLoading = false;
        return false;
      }
      this.changeTableData();
      //格式化数据
      let newObj = this.getFormData();
      
        //如果没有传入参数就是新增
        if (!this.keyValue) {

          request({
            url: baseUrl + "/"+this.addressUrl,
            method: "post",
            data : newObj
          }).then((res) => {
            this.submitLoading = false;
            this.$notify({
              title: "成功",
              message: "新增成功",
              type: "success",
            });
             this.$emit("onChange",true)
          });

        }
        else{

         request({
            url: baseUrl + "/"+this.addressUrl+"/" + this.keyValue,
            method: "put",
            data : newObj
          }).then((res) => {
            this.submitLoading = false;
            this.$notify({
              title: "成功",
              message: "修改成功",
              type: "success",
            });
             this.$emit("onChange",true)
          });

        }
       
       
      
      
      await this.handleSubmit();
    },
    cancelForm() {
      this.$emit("onChange", true)
    },
    formatTree(data, valueField, lableField, childField, type) {
      let tree = [];
      data.forEach((node, index) => {
        let newNode = {
          value: node[valueField],
          label: node[lableField],
        };
        if (type) {
          newNode.disabled = node[valueField] == undefined ? true : false
        }
        tree.push(newNode);
        if (node[childField] != null && node[childField].length > 0) {
          newNode.children = (this.formatTree(node[childField], valueField, lableField, childField,
          type));
        }
      }, this);
      return tree;
    },
    
          //辅助编辑 预留方法
          async handleEdit() {
            await this.insertEditEvent();
          },
          
    //FORM_EVENT_EDIT
    
        //辅助提交 预留方法
        async handleSubmit() {
          await this.insertSubmitEvent();
        },
        //辅助工作流提交 预留方法
        getHandleSubmitFormEvent() {
            
        },
        //辅助工作流表单事件 判断 表单事件是否已经执行过
        getisExecutedFormEvent() {
            let key = 'index'+this.$store.state.formParser.workflowFormTabIndexKey;
            return this.$store.state.formParser.isExecutedFormEvent[key]?this.$store.state.formParser.isExecutedFormEvent[key]:false;
            
        },
      
    async getField100Options() {
      // 注意：this.$axios是通过Vue.prototype.$axios = axios挂载产生的
      try {
        let resp = await this.$axios({
          method: 'get',
          url:  baseUrl + '/data-sources/80d3178d3eaba4723c100b239d661afe/data',
        });
        let {
          data
        } = resp.data;
        let tempData = [];
        if (data && data.length > 0) {
          tempData = data.map(ele => {
            if ('F_Id') {
              ele['F_Id'] = ele['F_Id'] + '';
            }
            return ele
          });
        }
        this.modle_idOptions = tempData
      }
      catch (error) {}
    },
    async getField109Options() {
      // 注意：this.$axios是通过Vue.prototype.$axios = axios挂载产生的
      try {
        let resp = await this.$axios({
          method: 'get',
          url:  baseUrl + '/data-items/ResolvingPower/detail',
        });
        if (resp.data.data) {
          this.resolving_powerOptions = resp.data.data;
        }
      }
      catch (error) {}
    },
	async downloadImg(imgurl){
		if(imgurl){
			var url = baseUrl+"/annexes-files/download?filedId="+imgurl.replace(baseUrl + "/annexes-files/","");
			window.open(url);
		}
	},
	//保存到我的设计
	saveImg(imgurl){
		var id = imgurl.replace(baseUrl + "/annexes-files/","");
		let newObj = {};
		newObj.F_Picture = id;
		newObj.F_KeyWork = this.formData.prompt;
		request({
		  url: baseUrl + "/"+this.addressUrl+"/saveMyDesign",
		  method: "post",
		  data : newObj
		}).then((res) => {
		  this.submitLoading = false;
		  this.$notify({
		    title: "成功",
		    message: "保存成功",
		    type: "success",
		  });
		});
	},
    async createImg() {
      // 注意 this.$axios是通过Vue.prototype.$axios = axios挂载产生的
      try {
		  let newObj = this.getFormData();
		  request({
		    url: baseUrl + "/"+this.addressUrl+"/createImg",
		    method: "post",
		    data : newObj,
			timeout:2000000,
		  }).then((res) => {
		    this.submitLoading = false;
		    this.$notify({
		      title: "成功",
		      message: "生成成功",
		      type: "success",
		    });
			if(res.data.data[0]){
				this.formData.img1 = baseUrl + "/annexes-files/"+res.data.data[0];
				this.formData.imgList.push(this.formData.img1);
			}else{
				this.formData.img1 ="";
			}
			if(res.data.data[1]){
				this.formData.img2 = baseUrl + "/annexes-files/"+res.data.data[1];
				this.formData.imgList.push(this.formData.img2);
			}else{
				this.formData.img2 ="";
			}
			if(res.data.data[2]){
				this.formData.img3 = baseUrl + "/annexes-files/"+res.data.data[2];
				this.formData.imgList.push(this.formData.img3);
			}else{
				this.formData.img3 ="";
			}
			if(res.data.data[3]){
				this.formData.img4 = baseUrl + "/annexes-files/"+res.data.data[3];
				this.formData.imgList.push(this.formData.img4);
			}else{
				this.formData.img4 ="";
			}
		  });
	  }
      catch (error) {
		  
	  }
    },
    async formClear() {
      // 注意 this.$axios是通过Vue.prototype.$axios = axios挂载产生的
      try {
		  this.formData.prompt="";
		  this.formData.modle_id="";
		  this.formData.batch_size=1;
		  this.formData.img1="";
		  this.formData.img2="";
		  this.formData.img3="";
		  this.formData.img4="";
		  this.formData.p_width=512;
		  this.formData.p_height=512;
	  }
      catch (error) {}
    },
    async triggerEventHandler(eventData) {
      if (eventData.length > 0) {
        eventData.forEach(ele => {
          let functionName = 'getField' + ele.componentFormId + 'Options';
          if (typeof this[functionName] == "function") {
            this[functionName]();
          }
        })
      }
    },
    triggerEventFormIdHandler(formId) {
      if (this.formFieldsMap.get(formId).__config__.triggerEvents && this.formFieldsMap.get(formId).__config__
        .triggerEvents.length > 0) {
        this.formFieldsMap.get(formId).__config__.triggerEvents.forEach(triggerEventItem => {
          if (this.formFieldsMap.get(formId).__config__.triggerEventData && this.formFieldsMap.get(formId)
            .__config__.triggerEventData[triggerEventItem] && this.formFieldsMap.get(formId).__config__
            .triggerEventData[triggerEventItem].length > 0) {
            this.triggerEventHandler(this.formFieldsMap.get(formId).__config__.triggerEventData[
              triggerEventItem]);
          }
        });
      }
      return true;
    },
    //清空联想弹层、多选弹层的值
    clearBombLayerFormData(filed) {
      this.formData[filed] = '';
      this.formData[filed + '_showValue'] = '';
    },
    // 流程参数赋值
    processParameterAssignment() {
      // 流程中的流程参数赋值 优先级最高，最后赋值
      setTimeout(() => {
        if (this.isEdit != 2 && this.parameter && this.parameter[this.mainTableName]) {
          this.showForm = false;
          for (let [key, value] of Object.entries(this.parameter[this.mainTableName])) {
            this.setFormDataValue(key, value);
          }
          this.showForm = true;
        }
      }, 0);
    },
    setFormDataValue(field, val) {
      if (Array.isArray(this.formData[field])) {
        if (val.includes(',')) {
          this.formData[field] = val.split(',');
        }
        else {
          this.formData[field] = [val];
        }
      }
      else {
        this.formData[field] = val;
      }
      //处理联想弹层，多选弹层
      if (this.formData[field + '_showValue'] != undefined) {
        this.formData[field + '_showValue'] = val;
      }
    },
    setOutputsValue(nodeType, formId, res, outputKey) {
      let nodeTypeChecked = false;
      if (nodeType == 'created') {
        nodeTypeChecked = this.operationVal == 'add';
      }
      else if (nodeType == 'edit') {
        nodeTypeChecked = this.operationVal == 'edit';
      }
      else if (nodeType == 'mounted') {
        nodeTypeChecked = this.operationVal == 'add' || this.operationVal == 'edit';
      }
      if (nodeTypeChecked && this.disabled != true && res && res.data && res.data.data && this.formFieldsMap
        .has(formId) && this.formFieldsMap.get(formId).__vModel__ && this.formData.hasOwnProperty(this
          .formFieldsMap.get(formId).__vModel__)) {
        this.setFormDataValue(this.formFieldsMap.get(formId).__vModel__, res.data.data[outputKey]);
        // 联想弹层 多选弹层 特殊处理
        if (this.formFieldsMap.get(formId).__config__ && this.formFieldsMap.get(formId).__config__.avueType &&
          this.needShowValueTags.includes(this.formFieldsMap.get(formId).__config__.avueType)) {
          this.formData[this.formFieldsMap.get(formId).__vModel__ + '_showValue'] = res.data.data[outputKey];
        }
        this.triggerEventFormIdHandler(formId);
      }
    },
    //子表单权限
    getAuthorityTableChildrenList(bindTable, children) {
      let column = [];
      if (bindTable && this.formEnCodeList && this.formEnCodeList[bindTable]) {
        let formSubEnCodeList = this.formEnCodeList[bindTable];
        if (children && children.length > 0) {
          column = children.map(ele2 => {
            if (formSubEnCodeList.includes(ele2.prop)) {
              ele2.hide = false;
            }
            else {
              ele2.hide = true;
            }
            if (ele2.hide == false) {
              //工作流中系统表单必填权限
              if (this.formSubTableNotRequiredList && this.formSubTableNotRequiredList[bindTable] !=
                undefined) {
                if (this.formSubTableNotRequiredList[bindTable].includes(ele2.prop)) {
                  ele2.required = false;
                }
                else {
                  ele2.required = true;
                }
              }
              ele2.rules = [];
              if (ele2.required) {
                ele2.rules = ele2.ruleList;
              }
              // disabled 属性
              if (this.formSubTableDisabledList && this.formSubTableDisabledList[bindTable] !=
                undefined) {
                if (this.formSubTableDisabledList[bindTable].includes(ele2.prop)) {
                  ele2.disabled = true;
                }
                else {
                  ele2.disabled = false;
                }
              }
              if (this.disabled) { //查看
                ele2.disabled = true;
              }
            }
            else {
              ele2.rules = []
              if (ele2.required) {
                ele2.ruleList.forEach(el => {
                  el.message += ',' + this.$t('noFormAuth')
                })
                ele2.rules = ele2.ruleList;
              }
            }
            return ele2;
          });
        }
        return column;
      }
      else {
        return children;
      }
    },
    async insertCreatedEvent() {
      
    },
    async insertMountedEvent() {
      
    },
    async insertEditEvent() {
      
    },
    async insertSubmitEvent() {
      
    },
    getFormConfig() {
       return fieldsConfig();
    },
    getFormFieldsMap() {
       return formFieldsMap();
    },
    async getHideComponentsMap() {
      let mapList = new Map();
      let hideComponentList = this.getHideComponents();
      if (typeof this.initHideComponentList == 'function') {
        mapList = await this.initHideComponentList(hideComponentList);
        this.$store.commit("SET_HIDE_COMPONENT_LIST", mapList);
      }
      return mapList;
    },
    getHideComponentsMapItem(key) {
      if (this.hideComponentsMap.size > 0) {
        return this.hideComponentsMap.has(key) ? this.hideComponentsMap.get(key) : "";
      }
      else {
        return ""
      }
    },
    getHideComponents() {
       return getHideComponents();
    },
  }
}

</script>
<style>
.el-button--opr-primary {
	padding:5px !important;
}
.el-table__empty-block {
  width: 100% !important;
}

.avue-form__row {
  padding: 0 !important;
}

#editorphone {
  width: 375px;
  margin: 0 auto;
  border: 1px solid #E4E7ED;
  padding: 0 7.5px;
  background: #f5f6fa;
  height: 700px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 5px;
}

#editorphone .el-col {
  border-bottom: 1px solid #F2F2F2;
  background: #fff;
  margin-bottom: 0;
  padding: 0 15px 6px !important;
  width: 100%;
}

#editorphone .el-form-item__label {
  line-height: 20px
}

#editorphone .el-input-group .el-input__inner {
  background: #f5f6fa
}

#editorphone .el-input__inner {
  border: 0
}

#editorphone .el-input-group__append,
#editorphone .el-input-group__prepend {
  border: 0;
  background: #edeef2;
  color: #666;
}

#editorphone .el-input-group .el-input__prefix {
  left: 44px
}

#editorphone .el-input-group .el-input__suffix {
  right: 44px
}

#editorphone .el-form-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-flow: wrap;
}

#editorphone .el-form-item__label {
  float: none;
  min-width: 85px;
  width: auto !important;
  text-align: left;
  flex: auto;
}

#editorphone .tinymce .el-form-item__label {
  min-width: 100%;
}

#editorphone .el-form-item__content {
  margin-left: 0px !important;
  flex: auto;
  width: calc(100% - 95px);
}

#editorphone .avueFormNoLable .el-form-item__label,
#editorphone .avueFormNoLable .avue-crud__pagination {
  display: none;
}

#editorphone .avueFormNoLable .el-collapse-item__wrap,
#editorphone .avueFormNoLable .el-collapse {
  border-bottom: 0
}

#editorphone .avueFormNoLable .el-col {
  border-bottom: 0;
  padding-bottom: 0
}

#editorphone .el-form-item__content .el-button:first-child {
  margin-left: 90px;
}

</style>
